package spring.study.annotation.Condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;
import spring.study.annotation.bean.Blue;

/**
 * @author study
 * @version 1.0
 * @date 2020/6/19 16:53
 * 自定义需要导入的组件
 */

public class MyImports implements ImportSelector {
    /**
     * AnnotationMetadata:当前标注@Import注解的类所有注解信息。
     */
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        return new String[]{"spring.study.annotation.bean.Blue"};
    }
}
